import java.sql.Timestamp;
import java.util.Date;
import xyz.qduwo.dao.UserDao;
import xyz.qduwo.entity.UserEntity;
import xyz.qduwo.util.EncryptUtils;

public class Main {

    public static void main(final String[] args) throws Exception {
        System.out.println("*********util.Date转sql.Date*********");
        Date utilDate = new Date();//util.Date
        System.out.println("utilDate : " + utilDate);
        Timestamp sqlDate = new Timestamp(utilDate.getTime());//util.Date转sql.Date
        System.out.println("sqlDate : " + sqlDate);

        System.out.println("*********sql.Date转util.Date*********");
        System.out.println("sqlDate : " + sqlDate);
        Date date = new Date(sqlDate.getTime());//sql.Date转util.Date
        /*
        java.util.Date date = new java.util.Date(sqlDate.getTime());
         */
        System.out.println("utilDate : " + date);
    }
}